﻿using System;
using System.Collections.Generic;
namespace Microsoft.Data.Edm
{
    /// <summary>
    /// Represents the common base type of EDM functions and function imports.
    /// </summary>
    public interface IEdmFunctionBase : IEdmNamedElement, IEdmVocabularyAnnotatable, IEdmElement
    {
        /// <summary>
        /// Gets the return type of this function.
        /// </summary>
        IEdmTypeReference ReturnType
        {
            get;
        }
        /// <summary>
        /// Gets the collection of parameters for this function.
        /// </summary>
        IEnumerable<IEdmFunctionParameter> Parameters
        {
            get;
        }
        /// <summary>
        /// Searches for a parameter with the given name, and returns null if no such parameter exists.
        /// </summary>
        /// <param name="name">The name of the parameter being found.</param>
        /// <returns>The requested parameter or null if no such parameter exists.</returns>
        IEdmFunctionParameter FindParameter(string name);
    }
}